import { hopeTheme } from "vuepress-theme-hope";
import { zhNavbar } from "./navbar/index.js";
import { zhSidebar } from "./sidebar/index.js";
const metadata = {
  author: "香辛料",
}
export default hopeTheme({
  hostname: "https://ylyhappy.gitee.io/",
  copyright: "",
  author: {
    name: "Yly Happy",
    url: "https://ylyhappy.gitee.io/",
  },
  iconAssets: "iconfont",

  logo: "/logo.jpg",

  repoLabel: "Source",
  repo: "https://gitee.com/ylyhappy/ylyhappy.git",
  repoDisplay: true,

  docsDir: "docs",

  pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],

  footer: `
    <ul style="padding:0px;list-style-type:none;">
      <li>备案号:<a href="https://beian.miit.gov.cn" target="_blank">冀ICP备2021023004号-2</a></li>
      <li>作者: <a href="/intro.html">${metadata.author}</a></li>
      <li>版权声明：<a href="https://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh" target="_blank">CC BY-NC-ND 3.0</a></li>
    </ul>
  `,
  blog: {
    medias: {
      BiliBili: "https://space.bilibili.com/617645302?spm_id_from=333.1007.0.0",
      Gitee: "https://gitee.com/ylyhappy",
      GitHub: "https://github.com/war3dgjddhh?tab=repositories",
      // QQ: "https://example.com",
      // Wechat: "https://example.com",
    },
    name: 'Yly',
    avatar: "/logo.jpg",
    // roundAvatar: true,
    description: "一个前端开发者",
    intro: "/intro.html",
  },

  // navbar
  navbar: zhNavbar,

  // sidebar
  sidebar: zhSidebar,


  displayFooter: true,
  // page meta
  metaLocales: {
    editLink: "在 Gitee 上编辑此页",
  },

  encrypt: {
    config: {
      "/posts/goal/shcool-baggage.html": ["hhh0457"],
    },
  },

  plugins: {
    blog: true,

    copyright: false, //  复制文章时,附加版权信息 @link https://vuepress-theme-hope.github.io/v2/zh/guide/feature/copyright.html

    // If you don’t need comment feature, you can remove following option
    // The following config is for demo ONLY, if you need comment feature, please generate and use your own config, see comment plugin documentation for details.
    // To avoid disturbing the theme developer and consuming his resources, please DO NOT use the following config directly in your production environment!!!!!
    comment: {
      /**
       * Using Giscus
       */
      // provider: "Giscus",
      // repo: "vuepress-theme-hope/giscus-discussions",
      // repoId: "R_kgDOG_Pt2A",
      // category: "Announcements",
      // categoryId: "DIC_kwDOG_Pt2M4COD69",

      /**
       * Using Twikoo
       */
      // provider: "Twikoo",
      // envId: "https://twikoo.ccknbc.vercel.app",

      /**
       * Using Waline
       */
      // provider: "Waline",
      // serverURL: "https://vuepress-theme-hope-comment.vercel.app",
    },

    // Disable features you don’t want here
    mdEnhance: {
      align: true,
      attrs: true,
      chart: true,
      codetabs: true,
      container: true,
      demo: true,
      echarts: true,
      flowchart: true,
      gfm: true,
      imgLazyload: true,
      figure: true,
      imgSize: true,
      include: true,
      katex: true,
      mark: true,
      mermaid: true,
      playground: {
        presets: ["ts", "vue"],
      },
      presentation: ["highlight", "math", "search", "notes", "zoom"],
      stylize: [
        {
          matcher: "Recommended",
          replacer: ({ tag }) => {
            if (tag === "em")
              return {
                tag: "Badge",
                attrs: { type: "tip" },
                content: "Recommended",
              };
          },
        },
      ],
      sub: true,
      sup: true,
      tabs: true,
      vPre: true,
      vuePlayground: true,
    },

    pwa: {
      favicon: "/favicon.ico",
      cacheHTML: true,
      cachePic: true,
      appendBase: true,
      apple: {
        icon: "/assets/icon/apple-icon-152.png",
        statusBarColor: "black",
      },
      msTile: {
        image: "/assets/icon/ms-icon-144.png",
        color: "#ffffff",
      },
      manifest: {
        icons: [
          {
            src: "/assets/icon/chrome-mask-512.png",
            sizes: "512x512",
            purpose: "maskable",
            type: "image/png",
          },
          {
            src: "/assets/icon/chrome-mask-192.png",
            sizes: "192x192",
            purpose: "maskable",
            type: "image/png",
          },
          {
            src: "/assets/icon/chrome-512.png",
            sizes: "512x512",
            type: "image/png",
          },
          {
            src: "/assets/icon/chrome-192.png",
            sizes: "192x192",
            type: "image/png",
          },
        ],
        shortcuts: [
          {
            name: "Demo",
            short_name: "Demo",
            url: "/demo/",
            icons: [
              {
                src: "/assets/icon/guide-maskable.png",
                sizes: "192x192",
                purpose: "maskable",
                type: "image/png",
              },
              {
                src: "/assets/icon/guide-monochrome.png",
                sizes: "192x192",
                purpose: "monochrome",
                type: "image/png",
              },
            ],
          },
        ],
      },
    },
  },
});



